import { createRouter, createWebHistory } from 'vue-router';
import HomePage from '../pages/HomePage.vue'; // 导入时使用正确的名称
import RestaurantDetail from '../pages/RestaurantDetail.vue';
import UserProfile from '../pages/UserProfile.vue';

const routes = [
    { path: '/', component: HomePage }, // 确保使用正确的组件名称
    { path: '/restaurant/:id', component: RestaurantDetail },
    { path: '/user', component: UserProfile },
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;

